﻿namespace SocialNetwork.Domain.Entities
{
    public class Cinema
    {
        public int ID { get; set; }

        public string Name { get; set; }

        #region Equality members

        public bool Equals(Cinema other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;
            return other.ID == ID;
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            if (obj.GetType() != typeof (Cinema)) return false;
            return Equals((Cinema) obj);
        }

        public override int GetHashCode()
        {
            return ID;
        }

        #endregion
    }
}
